

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>fix move/mesh command &mdash; LIGGGHTS v3.X documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="LIGGGHTS v3.X documentation" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="Manual.html" class="icon icon-home"> LIGGGHTS
          

          
          </a>

          
            
            
              <div class="version">
                v3.X
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_input_script.html">3. Input Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">4. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_gran_models.html">5. Contact models</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_mesh_modules.html">6. Mesh modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">7. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">8. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">9. Modifying &amp; extending LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">10. Python interface to LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">11. Errors</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="Manual.html">LIGGGHTS</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="Manual.html">Docs</a> &raquo;</li>
        
      <li>fix move/mesh command</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/fix_move_mesh.txt" rel="nofollow"> View page source</a>
          
          <a href="http://www.cfdem.com"> Website</a>
          
            <a href="Section_commands.html#comm" rel="nofollow"> Commands</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
  
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="fix-move-mesh-command">
<span id="index-0"></span><h1>fix move/mesh command<a class="headerlink" href="#fix-move-mesh-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>fix ID group-ID move/mesh mesh mesh-ID style args keyword values ...
</pre></div>
</div>
<ul class="simple">
<li>ID is documented in <a class="reference internal" href="fix.html"><em>fix</em></a> command, group-ID is ignored</li>
<li>move/mesh = style name of this fix command</li>
<li>mesh = obligatory keyword</li>
<li>mesh-ID = ID for the fix mesh that the fix move/mesh is applied to</li>
<li>style = <em>linear</em> or <em>linear/variable</em> or <em>wiggle</em> or <em>riggle</em> or <em>rotate</em> or <em>rotate/variable</em> or <em>viblin</em> or <em>vibrot</em> or <em>file</em></li>
</ul>
<pre class="literal-block">
<em>linear</em> args = Vx Vy Vz
  Vx,Vy,Vz = components of velocity vector (velocity units)
<em>linear/variable</em> args = var_Vx var_Vy var_Vz
  var_Vx,var_Vy,var_Vz = variables specifying components of velocity vector (velocity units)
<em>wiggle</em> args = amplitude Ax Ay Az period per
  amplitude = obligatory keyword
  Ax,Ay,Az = components of amplitude vector (distance units)
  period = obligatory keyword
  per = period of oscillation (time units)
<em>riggle</em> args = origin Px Py Pz axis ax ay az period per amplitude ampl
  origin = obligatory keyword
  Px,Py,Pz = origin point of axis of rotation (distance units)
  axis = obligatory keyword
  ax,ay,az = axis of rotation vector (distance units)
  period = obligatory keyword
  per = period of rotation (time units)#
  amplitude = obligatory keyword
  ampl = amplitude of riggle movement (grad)
<em>rotate</em> args = origin Px Py Pz axis ax ay az period per
  origin = obligatory keyword
  Px,Py,Pz = origin point of axis of rotation (distance units)
  axis = obligatory keyword
  ax,ay,az = axis of rotation vector (distance units)
  period = obligatory keyword
  per = period of rotation (time units)
<em>rotate/variable</em> args = origin Px Py Pz axis ax ay az omega var_omega
  origin = obligatory keyword
  Px,Py,Pz = origin point of axis of rotation (distance units)
  axis = obligatory keyword
  ax,ay,az = axis of rotation vector (distance units)
  omega = obligatory keyword
  var_omega = variable specifying angular velocity (rad / time units)
<em>viblin</em> args = axis ax ay az order n amplitude C1 ... Cn phase p1 ... pn period per
  axis = obligatory keyword
  ax,ay,az = components of moving direction vector (distance units)(origin 0 0 0)
  order= obligatory keyword
  n= order of trigonometric series n (from 1 to 30)
  amplitude = obligatory keyword
  C1, ..., Cn = amplitude (distance units)
  phase = obligatory keyword
  p1, ...,pn = phase of functionterm (rad) (number of terms is equivalent to order n)
  period = obligatory keyword
  per_1, ..., per_n = period of rotation (time units)
<em>vibrot</em> args = origin Px Py Pz axis ax ay az order n amplitude C1 ... Cn phase p1 ... pn period per
  origin = obligatory keyword
  Px,Py,Pz = origin point of axis of rotation (distance units)
  axis = obligatory keyword
  ax,ay,az = axis of rotation vector
  order= obligatory keyword
  n= order of trigonometric series (from 1 to 30)
  amplitude = obligatory keyword
  C1, ..., Cn = amplitude (rad)
  phase = obligatory keyword
  p1, ...,pn = phase of functionterm (rad) (number of terms is equivalent to order n)
  period = obligatory keyword
  per_1, ..., per_n = period of rotation (time units)
</pre>
<pre class="literal-block">
<em>file</em> args = discussed on <code class="xref doc docutils literal"><span class="pre">fix</span> <span class="pre">move/mesh</span> <span class="pre">file</span></code> doc page (might not be available)
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>fix move all move/mesh mesh cad1 wiggle amplitude -0.1 0. 0. period 0.02
fix move all move/mesh mesh cad1 rotate origin 0. 0. 0. axis  0. 0. 1. period 0.05
fix move all move/mesh mesh cad1 linear 5. 5. 0.
fix move all move/mesh mesh cad1 viblin axis 0. 0. 1 order 5 amplitude 0.4 0.1 0.3 0.1 0.1 phase 1.3 2 0.4 0.1 0 period 0.02 0.07 0.035 0.023 0.0175
fix move all move/mesh mesh cad1 vibrot origin 0. 0. 0 axis 0. 0. 1 order 2 amplitude 0.4 0.1  phase 1.3 0 period 0.02 0.04
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Perform updates of position and velocity for mesh elements which are
part of the <a class="reference internal" href="fix_mesh_surface.html"><em>fix_mesh_surface</em></a> with ID <em>mesh-ID</em>
using the specified settings or formulas. The fix group is ignored
for this command.</p>
<hr class="docutils" />
<p>The <em>linear</em> style moves mesh elements at a constant velocity, so that their
position <em>X</em> = (x,y,z) as a function of time is given in vector
notation as</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">X</span><span class="p">(</span><span class="n">t</span><span class="p">)</span> <span class="o">=</span> <span class="n">X0</span> <span class="o">+</span> <span class="n">V</span> <span class="o">*</span> <span class="n">delta</span>
</pre></div>
</div>
<p>where <em>X0</em> = (x0,y0,z0) is their position at the time the fix is
specified, <em>V</em> is the specified velocity vector with components
(Vx,Vy,Vz), and <em>delta</em> is the time elapsed since the fix was
specified.  This style also sets the velocity of each atom to V =
(Vx,Vy,Vz).</p>
<p>The <em>linear/variable</em> style does the same as the <em>linear</em> style,
but uses three variables so that the velocity can be time-dependant.</p>
<p>The <em>wiggle</em> style moves atoms in an oscillatory fashion, so that
their position <em>X</em> = (x,y,z) as a function of time is given in vector
notation as</p>
<div class="highlight-python"><div class="highlight"><pre>X(t) = X0 + A sin(omega*delta)
</pre></div>
</div>
<p>where <em>X0</em> = (x0,y0,z0) is their position at the time the fix is
specified, <em>A</em> is the specified amplitude vector with components
(Ax,Ay,Az), <em>omega</em> is 2 PI / <em>period</em>, and <em>delta</em> is the time
elapsed since the fix was specified.  This style also sets the
velocity of each element to the time derivative of this expression.</p>
<p>The <em>rotate</em> style rotates around a rotation axis <em>R</em> =
(Rx,Ry,Rz) that goes thru a point <em>P</em> = (Px,Py,Pz).  The <em>period</em> of
the rotation is also specified.  This style also sets the velocity of
each element to (omega cross Rperp) where omega is its angular velocity
around the rotation axis and Rperp is a perpendicular vector from the
rotation axis to the atom. Note that the direction of rotation
around the rotation axis is consistent with the right-hand rule:
if your right-hand&#8217;s thumb points along <em>R</em>, then your fingers
wrap around the axis in the direction of rotation.</p>
<p>The <em>rotate/variable</em> style does the same as the <em>rotate</em> style,
but uses a variable for the angular velocity so that the angular
velocity can be time-dependant.
IMPORTANT NOTE: style <em>rotate</em> takes the period of the rotation
as input, <em>rotate/variable</em> takes angular velocity as input.</p>
<p>The <em>riggle</em> style imposes an oscillatory rotation around a rotation
axis <em>R</em> = (Rx,Ry,Rz) that goes thru a point <em>P</em> = (Px,Py,Pz).
The <em>period</em> of the oscillation is specified as well as the <em>amplitude</em>
in grad (°). This style also sets the velocity of
each element accordingly.</p>
<p>The <em>viblin</em> style moves meshes in an oscillatory fashion with an vibration
function of higher order, so that their position <em>X</em> = (x,y,z) as a function
of time is given in vector notation as</p>
<img alt="_images/viblin.jpg" class="align-center" src="_images/viblin.jpg" />
<p>where <em>X0</em> = (x0,y0,z0) is their position at the time the fix is specified,
<em>n</em> represents the order of the trigonometric series, <em>Cn</em> is the specified
amplitude along the direction given by <em>axis</em> = (ax,ay,az). The vector <em>D</em>
is the unit vector of <em>axis</em>. The angular velocity <em>omega n</em> is 2 PI / <em>period n</em>,
and <em>delta</em> is the time elapsed since the fix was specified. This style
also sets the velocity of each element to the time derivative of this expression.</p>
<p>The <em>vibrot</em> style generates an oscillatory rotation around a rotation <em>axis</em> =
(ax,ay,az) that goes thru a point <em>origin</em> = (Px,Py,Pz). The <em>period</em> of the
oscillation is used to calculate omega, the amplitudes <em>Cn</em> and the phase phase
<em>n</em> are given in rad. The change of rotation angle per time <em>gamma(t)</em> is
described by trigonometric series of order <em>n</em>. The formula for this change is</p>
<img alt="_images/vibrot.jpg" class="align-center" src="_images/vibrot.jpg" />
<p>This style also sets the velocity of each element accordingly</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If a dangerous tri neighbor list build is detected, this may be due to
the fact that the geometry is moved too close to a region where particle
insertion is taking place so that initial interpenetration happens when
the particles are inserted.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">When moving a mesh element, not only the node positions are moved
but also a couple of other vectors. So moving one mesh element is more
costly as one particle.</p>
</div>
<p><strong>Superposition of multiple fix move/mesh commands:</strong></p>
<p>It is possible to superpose multiple fix move/mesh commands. In this
case, the reference frame for the second move command moves along as
the mesh is moved by the first move command etc. E.g. for style <em>rotate</em>,
the origin of the rotation axis would be in local reference frame.</p>
<p>Example: A mesh should rotate around a central axis and additionally
revolve around its center of mass. The first move command should be
the rotation around the central axis, the second move command the
revolution around the center of mass of the mesh.</p>
<p>Note, because of this the order of these fixes is important. A rotate mover that
comes before a linear mover would have a fixed center of rotation, whereas in
the opposite case the center of rotation would move linearly with the object.</p>
</div>
<div class="section" id="restart-fix-modify-output-run-start-stop-minimize-info">
<h2>Restart, fix_modify, output, run start/stop, minimize info<a class="headerlink" href="#restart-fix-modify-output-run-start-stop-minimize-info" title="Permalink to this headline">¶</a></h2>
<p>This fix writes the original coordinates of moving elements to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>, so that the motion can be continuous in a
restarted simulation.  See the <a class="reference internal" href="read_restart.html"><em>read_restart</em></a>
command for info on how to re-specify a fix in an input script that
reads a restart file, so that the operation of the fix continues in an
uninterrupted fashion.</p>
<p>None of the <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a> options are relevant to this
fix.</p>
<p>No parameter of this fix can be used with the <em>start/stop</em> keywords of
the <a class="reference internal" href="run.html"><em>run</em></a> command.  This fix is not invoked during <code class="xref doc docutils literal"><span class="pre">energy</span> <span class="pre">minimization</span></code>.</p>
</div>
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>If multiple fix move/mesh movements are superposed onto one mesh,
they have to be deleted in reverse order of their creation
Mesh elements may not be deleted in case due to leaving the simulation box for a fixed boundary.
In this case, an error is generated. See <a class="reference internal" href="boundary.html"><em>boundary</em></a> command for details.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="fix_mesh_surface.html"><em>fix mesh/surface</em></a></p>
<p><strong>Default:</strong> none</p>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016, DCS Computing GmbH, JKU Linz and Sandia Corporation.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'v3.X',
            LANGUAGE:'None',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: ''
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>